<?php
include 'database.php'; //数据库的配置信息
require 'lianjie.php';  // 数据库的操作函数
$name = $_GET["name"];
$password = $_GET["password"];

$con = lianjieshujuku("127.0.0.1", "root", "root");
if (!mysqli_select_db($con, 'floweruser')) {
    die("选择数据库失败");
}
$req = mysqli_query($con, "select * from `user` WHERE `username` ='$name' AND `password`='$password'");
$phone = mysqli_fetch_array($req)['phone'];
$num = mysqli_num_rows($req);
if ($num) {
    echo "ok"."|".$phone;

} else {
    echo "no";
}

//if($name=="admin"&&$password=="root"){
//    echo"ok";
//}
//else{
//    echo "no";
//}